package homework.test6;

import java.util.Properties;

/*
// 6.使用Properties类的方法完成增删改查
 */
public class Demo6 {
    public static void main(String[] args) {
        Properties prop = new Properties();

        //增
        prop.setProperty("合肥","安徽");
        prop.setProperty("南京","江苏");
        prop.setProperty("杭州","浙江");
        System.out.println(prop);

        //删
        prop.remove("南京");
        System.out.println(prop);

        //改
        prop.put("合肥","霸都");
        System.out.println(prop);

        //查
        Object o = prop.getProperty("合肥");
        System.out.println(o);
    }
}
